Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added error parsing to cause project recreation on 404 #69

Merged
merged 2 commits into from
Jul 29, 2022

Conversation

adam-skalicky
Copy link
Contributor

I am not a big fan of string parsing for error handling, but this was the best way I could resolve issue #68 without changing the client as I understand it.

This change parses for 404s on project reads. If a 404 is returned, the project ID will be set to an empty string triggering a project recreation and a message from Terraform notifying of the change made outside of Terraform.

If this change is okay, I believe it also needs to be added to the update method and potentially all the other resources as I do not see 404 handling.

atlantisbot and others added 2 commits July 26, 2022 17:03
* The request function now returns a custom error type `ResourceNotFoundError`
* A test has been added
@fourplusone
Copy link
Owner

fourplusone commented Jul 29, 2022

I modified the request(...) function to return a custom error, in case the requested resource does not exist

@fourplusone
Copy link
Owner

Resolves #68

@fourplusone fourplusone merged commit 24eb995 into fourplusone:master Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants